package test8;

public class SailBoat extends Boat{
    //帆船类SailBoat继承船类Boat
    private double keelDepth;//龙骨深度
    private int id;//帆船编号



    public SailBoat(int registrationNo, double length, String manufacturer, int year,int keelDepth,int id) {
        super(registrationNo, length, manufacturer, year);
        this.keelDepth = keelDepth;
        this.id = id;
    }
    public String toString (){
        return super.toString()+"船的龙骨深度为："+keelDepth+"船的id为："+id;
    }
}
